<template>
  <a-modal :visible="visible" :footer="null" @cancel="hide">
    <img alt="example" style="width: 100%" :src="src" />
  </a-modal>
</template>

<script>
export default {
    data () {
        return {
            visible: false,
            src: ''
        }
    },
    methods: {
        preview (src) {
            this.src = src
            this.show()
        },
        show () {
            this.visible = true
        },
        hide () {
            this.visible = false
        }
    }
}
</script>
